package com.demo.jdkproxy;

/**
 * Created by chenhe17596 on 2017/6/24.
 * 汽车类
 */
public class Car implements  Moveable{
    public void move() {
        try{
            System.out.println("汽车行驶中....");
            Thread.sleep((int)(Math.random()*1000));
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    public void stop() {
        System.out.println("汽车停止");
    }

    public void setCarName(String name) {
        System.out.println("修改汽车名称为:"+name);
    }

    public void setCarInfo(CarInfo carInfo) {
        System.out.println(carInfo);
    }
}
